import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqSArenaCrossFinalBattleHelper } from "./SeqSArenaCrossFinalBattleHelper";
type int = number;
//class SArenaCrossFinalBattles
    
    export  class SArenaCrossFinalBattles extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SArenaCrossFinalBattles();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.finalPosType);
            arg1.writeInt(this.ring);
            arg1.writeInt(this.battleNumInRing);
            SeqSArenaCrossFinalBattleHelper.write(arg1, this.finalBattles);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.finalPosType = arg1.readInt();
            this.ring = arg1.readInt();
            this.battleNumInRing = arg1.readInt();
            this.finalBattles = SeqSArenaCrossFinalBattleHelper.read(arg1);
            return;
        }

        public /* const */_type: int=366;

        public /* var */finalPosType: int;

        public /* var */ring: int;

        public /* var */battleNumInRing: int;

        public /* var */finalBattles: Array<any>;

        public static /* var */_regist: SArenaCrossFinalBattles;
    }

            SArenaCrossFinalBattles._regist = new SArenaCrossFinalBattles(true);
        